package com.joelaws.prototype.client.rpc;

import java.util.List;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.joelaws.prototype.client.data.Rating;
import com.joelaws.prototype.client.data.User;
import com.joelaws.prototype.client.meeting.ActionInfo;

public interface Dating extends RemoteService {

	public static final String SERVICE_URI = "/Dating";

	public static class Util {

		public static DatingAsync getInstance() {

			DatingAsync instance = (DatingAsync) GWT.create(Dating.class);
			ServiceDefTarget target = (ServiceDefTarget) instance;
			target.setServiceEntryPoint(GWT.getModuleBaseURL() + SERVICE_URI);
			return instance;
		}
	}

	public void rateUser(long thisUser, long ratedUser, short rating)
			throws Exception;

	public Rating getRating(long thisUser, long otherUser) throws Exception;

	public List<User> getRatedUsers(long thisUser) throws Exception;

	public List<User> getBrowseUsers(long thisUser, int start) throws Exception;

	public List<User> search(long userID, String searchString) throws Exception;

	public ActionInfo initMeeting(long thisUser, long otherUser)
			throws Exception;

	public ActionInfo executeAction(long thisUser, long otherUser, String choice)
			throws Exception;

	public List<User> getMeetingUsers(long thisUser) throws Exception;

}
